package com.nsapi.niceschoolapi.service.impl;

import com.nsapi.niceschoolapi.entity.*;
import com.nsapi.niceschoolapi.mapper.EvaluateMapper;
import com.nsapi.niceschoolapi.service.EvaluateService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service("evaluateService")
public class EvaluateServiceImpl implements EvaluateService {
    @Resource
    private EvaluateMapper evaluateMapper;

    @Override //查询是否已经评教
    public int count(String tchid) {
        return evaluateMapper.count(tchid);
    }

    @Override //添加教评
    public int addEvaluate(EvaluateRecordDB evaluateRecordDB) {
        return evaluateMapper.addEvaluate(evaluateRecordDB);
    }

    @Override //查询所有教评题目
    public List<EvaluateListDB> evaluateList() {
        return evaluateMapper.evaluateList();
    }

    @Override  //查询指定学生成绩
    public List<StuExamVO> stuExamList(Integer sid) {
        return evaluateMapper.stuExamList(sid);
    }

    @Override //查询学生选课记录
    public List<StudentVO> studentList(StudentVO studentVO) {
        return evaluateMapper.studentList(studentVO);
    }

    @Override //学生成绩录入
    public int add(StuExamVO stuExamVO) {
        return evaluateMapper.add(stuExamVO);
    }

    @Override //查询改学生是否已经添加过成绩
    public int selExam(StuExamVO stuExamVO) {
        return evaluateMapper.selExam(stuExamVO);
    }

    @Override
    public List<Map> selAllExam(SelAllExamVO selAllExamVO) {
        return evaluateMapper.selAllExam(selAllExamVO);
    }

    @Override //修改
    public int updateExam(StuExamDB stuExamDB) {
        return evaluateMapper.updateExam(stuExamDB);
    }


}
